
package cn.base.web.gateway.exception;


import cn.rengy.lang.CustomException;
import org.springframework.http.HttpStatus;

/**
 * 因为gateway使用filter实现认证（CustomErrorWebExceptionHandler），
 * 不能直接传递认证结果，使用抛出异常方式，所以定义了此异常类，code使用httpstatus
 *
 */
public class GatewayAuthException extends CustomException
{
    public int getHttpStatus() {
        return (int)this.getErrorCode();
    }

    public GatewayAuthException() {
        super();
    }

    public GatewayAuthException(HttpStatus httpStatus, String errorMsg){
        super(httpStatus.value(),errorMsg);
    }
    public GatewayAuthException(String message) {
        super(message);
    }


    public GatewayAuthException(Throwable cause) {
        super(cause);
    }

    public GatewayAuthException(String message, Throwable cause) {
        super(message, cause);
    }
}
